package org.beian.fmmall.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import org.beian.fmmall.VO.ResultVO;
import org.beian.fmmall.service.UserAddrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/useraddr")
@Api(tags = "用户地址管理",value = "提供用户地址信息相关接口")
public class UserAddrController {
    @Autowired
    private UserAddrService userAddrService;
    @GetMapping("/list")
    @ApiImplicitParam(name = "userId",value = "用户ID",required = true)
    public ResultVO listAddr(Integer userId, @RequestHeader("token") String token){
        return userAddrService.listAddrsByUid(userId);
    }
}
